
package com.shop.cloud.mall.api.controller;

import com.shop.cloud.common.core.constant.SecurityConstants;
import com.shop.cloud.common.core.util.R;
import com.shop.cloud.common.portal.util.ApiUtil;
import com.shop.cloud.weixin.common.feign.FeignWxLiveService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import jakarta.servlet.http.HttpServletRequest;

/**
 * 小程序直播
 *
 * @author
 * @date 2019-03-23 21:26:35
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/wxmalive")
@Tag(description = "wxmalive", name = "小程序直播API")
public class WxMaLiveController {

	private final FeignWxLiveService feignWxLiveService;

	/**
	* 获取直播房间列表
	* @return
	*/
	@Operation(summary = "获取直播房间列表")
	@GetMapping("/roominfo/list")
	public R getWxMaterialList(HttpServletRequest request) {
		return feignWxLiveService.getWxRoominfoList(ApiUtil.getAppId(request), SecurityConstants.FROM_IN);
	}
}
